/*
 * @ModuleName: 功能模块名称
 * @author: 上海灿实工程设备-陈世亮
 * @Date: 2022-02-06 11:09:42
 * @FilePath: \electron_vue\src\preload.js
 */

import { contextBridge, ipcRenderer } from "electron";

contextBridge.exposeInMainWorld("electron", {
  ipcRenderer,
  onMessage: (fn) => {
    ipcRenderer.on("message", (event, ...args) => fn(...args));
  }
});
